<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView(array_merge($this->context->getSubmodelheaderPlugins(), ['template']));?>
</head>
<body class="view_form" id="view_form_Auction">
<script>
function fieldConfig(){
    var url = '<?php echo $this->createUrl([$module.'/models/field', 'modelid' =>$this->context->submodel->modelid]);?>';	
	art.dialog.open(url,{
		id:'field',
		width:980,
		height:'100%',
		lock:true,
		fixed:true,
		drag: false,
		title:'配置字段项',
		close: function(){
		    //location.reload();
		}
	});
}

</script>
<div class="view-index-nav">
        <h3>模块配置</h3>
  <p class="tips">
        分类增、删、改、排序后需要<strong style="color:#F00">更新缓存</strong>方可生效。
        </p>
</div>
<div class="pt-20 padding-0-20 hiddene">
                    <div class="slideTxtBox mtop-0">
        <div class="hd">
                    <ul>
                
                <li class="on"><a href="javascript:;"><span></span>模块配置</a></li>
                <li><a href="javascript:;" onclick="fieldConfig();"><span></span>配置项字段</a></li>
            </ul>
                </div>
                </div>


</div>
<?php echo $this->render($this->context->getViewFiles('validate'), array('modelid' =>$this->context->submodel->modelid, 'fields'=>$this->context->submodel->fields));?>
 <form id="view-form-form" class="view-form-form" method="post" action="<?php echo $this->createUrl(['module/config','modelid' =>$this->context->submodel->modelid]);?>" enctype="multipart/form-data">

     <input type="hidden" id="modelid" name="modelid" value="<?php echo $this->context->submodel->modelid;?>">
            <table class="view-form-input" border="0" cellspacing="0" cellpadding="0" width="100%">
                <thead>
                <?php

				$widgets = $this->context->formWidgets('Backend', 'form', $model->attributes);
				foreach($widgets as $field=>$widget){
				?>
                      <tr>
                        <th valign="top" class="td-title"><label for="catid"><?php if($widget['fields']['required']){?><font class="required">*</font><?php }?><?php echo $widget['fields']['name'];?>：</label></th>
                        <td class="td-input">
						<?php
						echo $widget['widgets'];
                        ?>
						</td>
                    </tr>
                    
                <?php
				}
				?>
                      <tr>
                        <th></th>
                        <td><br>
                        <button class="ui-btn ui-btn-primary" type="submit">提交</button>
                            </td>
                    </tr>
                    
                        </tbody>
                    
            </table>
<?=$this->csrfToken()?>
 
    </form>

<?php $this->FooterView();?>
</body>
</html>


